Skip to content

Conversation

@ksinji
Copy link
Contributor

@ksinji ksinji commented Dec 15, 2025

🧷 문제 링크

https://www.acmicpc.net/problem/17352

🧭 풀이 시간

40분

👀 체감 난이도

✏️ 문제 설명

n개의 섬이 있고 각 섬을 연결하는 다리는 n-2개뿐이다.
모든 섬이 연결되도록 다리 하나를 추가할 때, 연결할 두 섬을 출력하라.

🔍 풀이 방법

유니온파인드 썼습니다.
n-2개 다리가 놓인대로 union하면 모든 섬이 연결되기에 다리 한개가 부족하므로 두 그룹으로 나뉨.
1번 섬의 루트와 다른 루트를 가진 섬 i를 찾아 출력.

⏳ 회고

@ksinji ksinji self-assigned this Dec 15, 2025
@ksinji ksinji added the success 👍 해설을 보지 않고 풀었을 때 label Dec 15, 2025
@ShinHeeEul ShinHeeEul merged commit 0293426 into main Dec 15, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

success 👍 해설을 보지 않고 풀었을 때

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants